package com.zxm.dubbodemo.provider;

import com.zxm.dubbodemo.provider.service.DefaultDemoService;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;

@SpringBootApplication
public class ProviderApplication {
    private static final String INTERFACE_RES_KEY = DefaultDemoService.class.getName();
//    private static final String RES_KEY = INTERFACE_RES_KEY + ":sayHello(java.lang.String)";
    public static void main(String[] args) {
//        FlowRule flowRule = new FlowRule(INTERFACE_RES_KEY)
//                .setCount(1)
//                .setGrade(RuleConstant.FLOW_GRADE_QPS);
//        FlowRuleManager.loadRules(Collections.singletonList(flowRule));
        new SpringApplicationBuilder(ProviderApplication.class)
                .web(WebApplicationType.NONE)
                .run(args);

    }
}
